package cn.com.blueInfo.bpm.system.enums;

import cn.com.blueInfo.bpm.common.enums.BaseEnum;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 是否默认隐藏
 * @author suxch
 * @since 2025/8/28 22:20
 */
@Getter
@AllArgsConstructor
public enum DynamicFormFieldHidden implements BaseEnum<Integer> {

    /** 是否默认隐藏-是 */
    DEFAULT_HIDDEN(1, "是"),
    /** 是否默认隐藏-否 */
    DEFAULT_VISIBLE(0, "否");

    @EnumValue
    private final Integer code;

    @JsonValue
    private final String desc;

    public static DynamicFormFieldHidden getByCode(Integer code) {
        return BaseEnum.getByCode(DynamicFormFieldHidden.class, code);
    }

    @JsonCreator
    public static DynamicFormFieldHidden getByName(String name) {
        return BaseEnum.getByName(name, DynamicFormFieldHidden.class);
    }

}
